package com.itheima.interface_demo.interface_test2;

public class Test {
    public static void main(String[] args) {
        // 空参构造 + set方法赋值
        BasketBallBoy basketBallBoy = new BasketBallBoy();
        basketBallBoy.setName("刘备");
        basketBallBoy.setAge(30);
        System.out.println("名字:" + basketBallBoy.getName());
        System.out.println("年龄:" + basketBallBoy.getAge());
        basketBallBoy.study();
        basketBallBoy.play();

        System.out.println("=====================");

        // 全参构造方法
        StudyGirl studyGirl = new StudyGirl("孙尚香" , 15);
        System.out.println("名字:" + studyGirl.getName());
        System.out.println("年龄:" + studyGirl.getAge());
        studyGirl.study();
    }
}
